<?php
/**
 * Trainingofferadmin_Controller_Trainingofferadmin
 * training offer admin controller
 *
 * @author Adrian Stolarski
 */
class Trainingofferadmin_Controller_Trainingofferadmin implements Trainingofferadmin_Controller_Mainable {
    
    /**
     *
     * @var type $training_offer_admin_model
     * training offer admin model handler
     */
    public $training_offer_admin_model;
    
    public $main_category_list;
    
    public $sub_category_list;
    
    public $activity_type;
    
    /**
     * constructor()
     */
    public function __construct() {
        $this->training_offer_admin_model = new Trainingofferadmin_Model_Trainingofferadmin;
        $this->main_category_list = new Core_Controller_Maincategorydata;
        $this->sub_category_list = new Core_Controller_Subcategorylist;
        $this->activity_type = new Core_Controller_Activitytype;
    }
    
    public function main(array $variables = null) {
        $page = $this->training_offer_admin_model->main($variables);
        $page['main_category_list'] = $this->main_category_list->main(null);
        $page['sub_category_list'] = $this->sub_category_list->main($variables);
        $page['activity_type'] = $this->activity_type->main($variables);
        var_dump($page);
        $view = new Core_Model_Oldview($page['template']);
        $view->assign('page', $page);
    }

}
